package com.zc.topmod.enumer;

/**
 * @ClassName RoadGradeEnum
 * @Description 道路等级
 * @Author zhucan
 * @Date 2019/01/31
 * @Version 1.0.0
 */

public enum RoadEvaLevelEnum {

    EXCELLENT("0", "优"),
    GOOD("1", "良"),
    MEDIUM("2", "中"),
    INFERIOR("3", "次"),
    POOR("4", "差"),
    ;
    private String key;
    private String value;

    private RoadEvaLevelEnum(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public String getKey() {
        return key;
    }

    public String getValue() {
        return value;
    }

    public static String getValue(String key) {
        for (RoadEvaLevelEnum enumer : RoadEvaLevelEnum.values()) {
            if (enumer.getKey().equals(key) ) {
                return enumer.getValue();
            }
        }
        return null;
    }
}
